#ifndef ENEMY_H
#define ENEMY_H


#include <system/application.h>
#include <vector>
#include "GameObject.h"

#include "maths\quaternion.h"
class Enemy : public GameObject
{
public:
	Enemy();

	~Enemy();
	
	//-- Set the properties of the enemy
	void SetOrigin(abfw::Matrix44 marker);
	void SetTarget(abfw::Vector3 target);
	void SetVelocity(abfw::Vector3 velocity);
	void SetRotationAngle(float angle);
	void DecreaseHealth(float amount);
	void SetDead(bool dead);

	//-- Return properties of the enemy
	float GetHealth();
	bool IsDead();
	float GetAngle();
	abfw::Matrix44 GetOrigin();
	abfw::Vector3 GetTarget();
	abfw::Vector3 GetVelocity();
	GameObject& GetHealthBar();

	//-- Update enemy health bar
	void UpdateHealthBar(abfw::Matrix44 origin);
	
private:

	GameObject mHealthBar;

	float mDirection;
	abfw::Matrix44 mOrigin;
	abfw::Vector3 mTarget;
	abfw::Vector3 mVelocity;

	abfw::Mesh* mHealthMesh;
	
	float mHealth;
	bool mHit;
	bool mDead;

	//-- Health bar offset
	float mOffsetY;
	float mOffsetZ;
	
};

#endif